package com.lagou.config;

import com.lagou.pojo.SimpleBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
//必须注入了条件内的类才能执行此方法
@ConditionalOnBean(ConfigMarker.class)
public class MyAutoConfiguration {

	static {

		System.out.println("MyAutoConfiguration init.... ");
	}

	@Bean
	public SimpleBean simpleBean(){
		return new SimpleBean();
	}



}
